package com.smedi.ismedi.inmail.core;

import com.smedi.ismedi.authoritymanagement.api.feign.RemoteAuthorityAccessFeignApi;
import com.smedi.ismedi.authoritymanagement.api.feign.RemoteAuthorityRoleManagementFeignApi;
import com.smedi.ismedi.authoritymanagement.api.feign.RemoteClientLoginFeignApi;
import com.smedi.ismedi.constructionproject.api.feign.RemoteProjectAssignmentFeignApi;
import com.smedi.ismedi.dangeroussourcemanage.api.feign.RemoteDangerousSourceManageFeignApi;
import com.smedi.ismedi.file.feign.RemoteFileFeignApi;
import com.smedi.ismedi.inmail.core.port.adapter.service.WeatherService;
import com.smedi.ismedi.labor.api.feign.RemoteLaborCoreFeignApi;
import com.smedi.ismedi.majorhazard.api.feign.RemoteMajorHazardFeignApi;
import com.smedi.ismedi.notification.api.feign.RemoteSmsNotificationFeignApi;
import com.smedi.ismedi.organization.api.feign.RemoteHrOrganizationFeignApi;
import com.smedi.ismedi.organization.api.feign.RemoteProjectOrganizationFeignApi;
import com.smedi.ismedi.personnel.api.feign.RemotePersonCoreFeignApi;
import com.smedi.ismedi.safety.education.api.feign.RemoteSafetyEducationFeignApi;
import com.smedi.ismedi.safetycheck.feign.RemoteSafetyCheckFeignApi;
import com.smedi.ismedi.video.monitor.api.feign.RemoteMonitorSettingFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

/**
 * 启动类
 *
 * @author jiangqinxuan
 * @date 2021/08/03
 */
@Slf4j
@SpringBootApplication(scanBasePackages={"com.smedi.ismedi"})
@EnableDiscoveryClient
@MapperScan({"com.smedi.ismedi.inmail.core.port.adapter.persistence.mybatis.mapper"})
@EnableFeignClients(basePackages = {
        "com.smedi.ismedi.constructionproject.api.feign",
        "com.smedi.ismedi.file.feign",
        "com.smedi.ismedi.organization.api.feign",
        "com.smedi.ismedi.authoritymanagement.api.feign",
        "com.smedi.ismedi.personnel.api.feign",
        "com.smedi.ismedi.notification.api.feign",
        "com.smedi.ismedi.safetycheck.feign",
        "com.smedi.ismedi.inmail.core.port.adapter.service",
        "com.smedi.ismedi.dangeroussourcemanage.api.feign",
        "com.smedi.ismedi.majorhazard.api.feign",
        "com.smedi.ismedi.video.monitor.api.feign",
        "com.smedi.ismedi.safety.education.api.feign"
}, basePackageClasses = {
        RemoteProjectAssignmentFeignApi.class,
        RemoteFileFeignApi.class,
        RemoteProjectOrganizationFeignApi.class,
        RemoteAuthorityRoleManagementFeignApi.class,
        RemotePersonCoreFeignApi.class,
        RemoteHrOrganizationFeignApi.class,
        RemoteSmsNotificationFeignApi.class,
        RemoteSafetyCheckFeignApi.class,
        RemoteLaborCoreFeignApi.class,
        WeatherService.class,
        RemoteClientLoginFeignApi.class,
        RemoteAuthorityAccessFeignApi.class,
        RemoteMonitorSettingFeignApi.class,
        RemoteAuthorityAccessFeignApi.class,
        RemoteDangerousSourceManageFeignApi.class,
        RemoteMajorHazardFeignApi.class,
        RemoteMonitorSettingFeignApi.class,
        RemoteSafetyEducationFeignApi.class,
        RemoteMonitorSettingFeignApi.class
})
@EnableAsync
public class ISmediInmailCoreApplication {
    public static void main(String[] args) {
        SpringApplication.run(ISmediInmailCoreApplication.class, args);
        log.debug("启动成功！！！");
    }
}
